import {BaseEntity,Column,Entity,Index,JoinColumn,JoinTable,ManyToMany,ManyToOne,OneToMany,OneToOne,PrimaryColumn,PrimaryGeneratedColumn,RelationId} from "typeorm";
import {QrtzTriggers} from "./QrtzTriggers";


@Entity("QRTZ_JOB_DETAILS",{schema:"nest-mall" } )
@Index("IDX_QRTZ_J_REQ_RECOVERY",["schedName","requestsRecovery",])
@Index("IDX_QRTZ_J_GRP",["schedName","jobGroup",])
export class QrtzJobDetails {

    @Column("varchar",{ 
        nullable:false,
        primary:true,
        length:120,
        name:"SCHED_NAME"
        })
    schedName:string;
        

    @Column("varchar",{ 
        nullable:false,
        primary:true,
        length:200,
        name:"JOB_NAME"
        })
    jobName:string;
        

    @Column("varchar",{ 
        nullable:false,
        primary:true,
        length:200,
        name:"JOB_GROUP"
        })
    jobGroup:string;
        

    @Column("varchar",{ 
        nullable:true,
        length:250,
        name:"DESCRIPTION"
        })
    description:string | null;
        

    @Column("varchar",{ 
        nullable:false,
        length:250,
        name:"JOB_CLASS_NAME"
        })
    jobClassName:string;
        

    @Column("varchar",{ 
        nullable:false,
        length:1,
        name:"IS_DURABLE"
        })
    isDurable:string;
        

    @Column("varchar",{ 
        nullable:false,
        length:1,
        name:"IS_NONCONCURRENT"
        })
    isNonconcurrent:string;
        

    @Column("varchar",{ 
        nullable:false,
        length:1,
        name:"IS_UPDATE_DATA"
        })
    isUpdateData:string;
        

    @Column("varchar",{ 
        nullable:false,
        length:1,
        name:"REQUESTS_RECOVERY"
        })
    requestsRecovery:string;
        

    @Column("blob",{ 
        nullable:true,
        name:"JOB_DATA"
        })
    jobData:Buffer | null;
        

   
    @OneToMany(type=>QrtzTriggers, qRTZ_TRIGGERS=>qRTZ_TRIGGERS.sChedName,{ onDelete: 'RESTRICT' ,onUpdate: 'RESTRICT' })
    qRtzTriggerSs:QrtzTriggers[];
    

   
    @OneToMany(type=>QrtzTriggers, qRTZ_TRIGGERS=>qRTZ_TRIGGERS.jObName,{ onDelete: 'RESTRICT' ,onUpdate: 'RESTRICT' })
    qRtzTriggerSs2:QrtzTriggers[];
    

   
    @OneToMany(type=>QrtzTriggers, qRTZ_TRIGGERS=>qRTZ_TRIGGERS.jObGroup,{ onDelete: 'RESTRICT' ,onUpdate: 'RESTRICT' })
    qRtzTriggerSs3:QrtzTriggers[];
    
}
